# coding: utf-8
from PySide6.QtWidgets import QApplication, QMainWindow, QTextEdit
from qelwidgets.components.widgets.rich_text_edit import RichTextEdit


class MainWindow(QMainWindow):
    def __init__(self):
        super().__init__()
        self.setWindowTitle("Rich Text Edit Example")
        self.resize(800, 600)

        self.text_edit = RichTextEdit()
        self.setCentralWidget(self.text_edit)
        self.setContentsMargins(20, 20, 20, 20)

        self.text_edit.setPlaceholderText("This is a rich text edit example.")


if __name__ == "__main__":
    app = QApplication([])
    window = MainWindow()
    window.setStyleSheet('background-color: #bdc3c7;')
    window.show()
    app.exec()
